package com.ibeeking.found.common.enums;

/**
 * 公众号自定义菜单等级
 */
public enum JobLevelEnum {

    Level_1(1,"一级"),
    Level_2(2,"二级"),
    Level_3(3,"三级"),
    Level_4(4,"四级"),
    Level_5(5,"五级"),
    Level_6(6,"六级"),
    Level_7(7,"七级"),
    Level_8(8,"八级"),
    Level_9(9,"九级"),
    Level_10(10,"十级"),
    Level_11(11,"十一级"),
    Level_12(12,"十二级"),
    Level_13(13,"十三级"),
    Level_14(14,"十四级"),
    Level_15(15,"十五级"),
    ;


    private Integer value;

    private String name;

    public Integer getValue() {
        return value;
    }

    public String getName() {
        return name;
    }

    JobLevelEnum(Integer value , String name){
        this.value = value;
        this.name = name;
    }

    public static String getNameByValue(Integer value) {
        for (JobLevelEnum enumObj : values()) {
            if (enumObj.getValue().equals(value)) {
                return enumObj.getName();
            }
        }
        return null;
    }

    public static JobLevelEnum getEnumByValue(Integer value) {
        for (JobLevelEnum enumObj : values()) {
            if (enumObj.getValue().equals(value)) {
                return enumObj;
            }
        }
        return null;
    }
}
